﻿<UserControl x:Class="WrapperTest.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Width="730"
    Height="500" 
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" 
    xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input" 
    xmlns:inputToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit">

    <Grid x:Name="LayoutRoot" Background="White" Loaded="LayoutRoot_Loaded">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="488*" />
            <ColumnDefinition Width="262*" />
        </Grid.ColumnDefinitions>
        <controls:TabControl x:Name="tab" TabStripPlacement="Left">
            <controls:TabItem Header="FriendsGet">
                <StackPanel>
                    <Button Content="Invoke" Click="InvokeFriendsGet" />
                    <TextBlock TextWrapping="Wrap" Text="IUser[] FriendsGet(string uid = null, bool ext = false)" />
                    <dataInput:Label Content="uid:"/>
                    <TextBlock Text="{Binding ElementName=list_users, Path=SelectedItem}" />
                    <CheckBox x:Name="cb_friendsGet" Content="ext"/>
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="FriendsGetAppUsers">
                <StackPanel>
                    <Button Content="Invoke" Click="InvokeFriendsGetAppUsers" />
                    <TextBlock TextWrapping="Wrap" Text="IUser[] FriendsGetAppUsers(string uid = null, bool ext = false)" />
                    <dataInput:Label Content="uid:"/>
                    <TextBlock Text="{Binding ElementName=list_users, Path=SelectedItem}" />
                    <CheckBox x:Name="cb_friendsGetAppUsers" Content="ext"/>
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="UsersGetInfo">
                <StackPanel>
                    <Button Content="Invoke" Click="InvokeUsersGetInfo" />

                    <TextBlock TextWrapping="Wrap" Text="IUser[] UsersGetInfo(string[] uids)" />
                    <dataInput:Label Content="uids:"/>
                    <ListBox x:Name="_list_usersGetInfo"/>
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="UsersIsAppUser">
                <StackPanel>
                    <Button Content="Invoke" Click="InvokeUsersIsAppUser" />
                    <TextBlock TextWrapping="Wrap" Text="bool UsersIsAppUser(string uid = null)" />
                    <dataInput:Label Content="uid:"/>
                    <TextBlock Text="{Binding ElementName=list_users, Path=SelectedItem}" />
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="UsersHasAppPermission">
                <StackPanel>
                    <Button Content="Invoke" Click="InvokeUsersHasAppPermission" />

                    <TextBlock TextWrapping="Wrap" Text="bool UsersHasAppPermission(AppPermissionType param, string uid = null)" />
                    <dataInput:Label Content="param:"/>
                    <ComboBox x:Name="cbx_usersHasAppPermission"/>
                    <dataInput:Label Content="uid:"/>
                    <TextBlock Text="{Binding ElementName=list_users, Path=SelectedItem}" />
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="PaymentsOpenDialogSms">
                <StackPanel>
                    <Button Content="Invoke" Click="InvokePaymentsOpenDialogSms" />

                    <TextBlock TextWrapping="Wrap" Text="bool PaymentsOpenDialogSms(int service_id, string service_name, int sms_price)" />
                    <dataInput:Label Content="service_id:"/>
                    <inputToolkit:NumericUpDown x:Name="nud_playmentsSmsServiceId" />
                    <dataInput:Label Content="service_name:"/>
                    <TextBox x:Name="tb_playmentsSmsServiceName" />
                    <dataInput:Label Content="sms_price:"/>
                    <inputToolkit:NumericUpDown Name="nud_playmentsSmsPrice" />
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="PaymentsOpenDialogOther">
                <StackPanel>
                    <Button Content="Invoke" Click="InvokePaymentsOpenDialogOther" />

                    <TextBlock TextWrapping="Wrap" Text="bool PaymentsOpenDialogOther(int service_id, string service_name, int other_price)" />
                    <dataInput:Label Content="service_id:"/>
                    <inputToolkit:NumericUpDown x:Name="nud_playmentsOtherServiceId" />
                    <dataInput:Label Content="service_name:"/>
                    <TextBox x:Name="tb_playmentsOtherServiceName" />
                    <dataInput:Label Content="other_price:"/>
                    <inputToolkit:NumericUpDown Name="nud_playmentsOtherPrice" />
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="StreamPublish">
                <StackPanel>
                    <Button Content="Invoke" Click="InvokeStreamPublish" />

                    <TextBlock TextWrapping="Wrap" Text="bool StreamPublish(string text, string post = null, int img = 0)" />
                    <dataInput:Label Content="text:"/>
                    <TextBox x:Name="tb_streamText" />
                    <dataInput:Label Content="post:"/>
                    <TextBox x:Name="tb_streamPost" />
                    <dataInput:Label Content="img:"/>
                    <inputToolkit:NumericUpDown Name="nud_streamImg" />
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="PhotosGetAlbums">
               <StackPanel>
                    <Button Content="Invoke" Click="InvokePhotosGetAlbums" />

                    <TextBlock TextWrapping="Wrap" Text="IPhotoAlbum[] PhotosGetAlbums(string uid = null, string[] aids = null)" />
                    <dataInput:Label Content="uid:"/>
                    <TextBlock Text="{Binding ElementName=list_users, Path=SelectedItem}" />
                    <dataInput:Label Content="aids:"/>
                    <ListBox x:Name="_list_photoAlbumsPhotosGetAlbums" />
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="PhotosGet">
                <StackPanel>
                    <Button Content="Invoke" Click="InvokePhotosGet" />

                    <TextBlock TextWrapping="Wrap" Text="IPhoto[] PhotosGet(string aid, string uid = null, string[] pids = null)" />
                    <dataInput:Label Content="aid:"/>
                    <TextBlock Text="{Binding ElementName=list_photoAlbums, Path=SelectedItem}" />
                    <dataInput:Label Content="uid:"/>
                    <TextBlock Text="{Binding ElementName=list_users, Path=SelectedItem}" />
                    <dataInput:Label Content="pids:"/>
                    <ListBox x:Name="_list_photosPhotosGet" />
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="AudiosGet">
                <StackPanel>
                    <Button Content="Invoke" Click="InvokeAudiosGet" />

                    <TextBlock TextWrapping="Wrap" Text="IAudio[] AudiosGet(string uid = null, string[] mids = null)" />
                    <dataInput:Label Content="uid:"/>
                    <TextBlock Text="{Binding ElementName=list_users, Path=SelectedItem}" />
                    <dataInput:Label Content="mids:"/>
                    <ListBox x:Name="_list_audiosAudiosGet" />
                </StackPanel>
            </controls:TabItem>
            <controls:TabItem Header="AudiosLinkAudio">
                <StackPanel>
                    <Button Content="Invoke" Click="InvokeAudiosLinkAudio" />

                    <TextBlock TextWrapping="Wrap" Text="bool AudiosLinkAudio(string mid)" />
                    <dataInput:Label Content="mid:"/>
                    <TextBlock Text="{Binding ElementName=list_audios, Path=SelectedItem}" />
                </StackPanel>
            </controls:TabItem>
        </controls:TabControl>
        
        <StackPanel  Grid.Column="1">
            <StackPanel Orientation="Horizontal">
                <dataInput:Label Content="Users, Count: " />
                <dataInput:Label Content="{Binding Path=Items.Count, ElementName=list_users}" />
            </StackPanel>
            <ListBox Name="list_users" Height="109" SelectionMode="Extended" SelectionChanged="list_users_SelectionChanged">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding Nick}" />
                            <TextBlock Text="{Binding Uid}" />
                            <ToolTipService.ToolTip>
                                <StackPanel>
                                    <TextBlock Text="{Binding FirstName}" />
                                    <TextBlock Text="{Binding LastName}" />
                                    <TextBlock Text="{Binding Nick}" />
                                    <TextBlock Text="{Binding Sex}" />
                                    <TextBlock Text="{Binding Birthday}" />
                                    <TextBlock Text="{Binding Pic}" />
                                    <TextBlock Text="{Binding PicSmall}" />
                                    <TextBlock Text="{Binding PicBig}" />
                                    <TextBlock Text="{Binding Link}" />
                                    <TextBlock Text="{Binding Uid}" />
                                </StackPanel>
                            </ToolTipService.ToolTip>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <StackPanel Orientation="Horizontal">
                <dataInput:Label  Content="PhotoAlbums, Count: " />
                <dataInput:Label Content="{Binding Path=Items.Count, ElementName=list_photoAlbums}" ></dataInput:Label>
            </StackPanel>
            <ListBox Name="list_photoAlbums" Height="109" SelectionMode="Extended" SelectionChanged="list_photoAlbums_SelectionChanged">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding Title}" />
                            <ToolTipService.ToolTip>
                                <StackPanel>
                                    <TextBlock Text="{Binding Aid}" />
                                    <TextBlock Text="{Binding CoverPid}" />
                                    <TextBlock Text="{Binding Owner}" />
                                    <TextBlock Text="{Binding Title}" />
                                    <TextBlock Text="{Binding Description}" />
                                    <TextBlock Text="{Binding Created}" />
                                    <TextBlock Text="{Binding Updated}" />
                                    <TextBlock Text="{Binding Size}" />
                                    <TextBlock Text="{Binding Privacy}" />
                                </StackPanel>
                            </ToolTipService.ToolTip>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <StackPanel Orientation="Horizontal">
                <dataInput:Label  Content="Photos, Count: " />
                <dataInput:Label Content="{Binding Path=Items.Count, ElementName=list_photos}" />
            </StackPanel>
            <ListBox Name="list_photos" Height="109" SelectionMode="Extended" SelectionChanged="list_photos_SelectionChanged" >
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding Title}" />
                            <ToolTipService.ToolTip>
                                <StackPanel>
                                    <TextBlock Text="{Binding Pid}" />
                                    <TextBlock Text="{Binding Aid}" />
                                    <TextBlock Text="{Binding Owner}" />
                                    <TextBlock Text="{Binding Src}" />
                                    <TextBlock Text="{Binding SrcSmall}" />
                                    <TextBlock Text="{Binding SrcBig}" />
                                    <TextBlock Text="{Binding Created}" />
                                    <TextBlock Text="{Binding Size}" />
                                    <TextBlock Text="{Binding Width}" />
                                    <TextBlock Text="{Binding Height}" />
                                    <TextBlock Text="{Binding Title}" />
                                </StackPanel>
                            </ToolTipService.ToolTip>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <StackPanel Orientation="Horizontal">
                <dataInput:Label  Content="Audios, Count: " />
                <dataInput:Label Content="{Binding Path=Items.Count, ElementName=list_audios}" />
            </StackPanel>
            <ListBox Name="list_audios" Height="109" SelectionMode="Extended" SelectionChanged="list_audios_SelectionChanged" >
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding Title}" />
                            <ToolTipService.ToolTip>
                                <StackPanel>
                                    <TextBlock Text="{Binding Mid}" />
                                    <TextBlock Text="{Binding Owner}" />
                                    <TextBlock Text="{Binding Artist}" />
                                    <TextBlock Text="{Binding Title}" />
                                    <TextBlock Text="{Binding Duration}" />
                                    <TextBlock Text="{Binding Size}" />
                                    <TextBlock Text="{Binding Created}" />
                                    <TextBlock Text="{Binding Link}" />
                                </StackPanel>
                            </ToolTipService.ToolTip>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </StackPanel>
    </Grid>
</UserControl>
